package pers.litao.bit.order.openfeign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import pers.litao.bit.commons.utils.R;


/**
 * @author 李涛
 * @date 2020-12-01 13:40
 */
@FeignClient("bit-user-service")
public interface UserFeignService {
    /**
     * 获取用户信息
     *
     * @param id
     * @return
     */
    @RequestMapping(value = "/user/userinfo/getuser/{id}", method = RequestMethod.GET)
    R getUser(@PathVariable("id") Long id);

    /**
     * 根据ID获取所有用户
     *
     * @param ids
     * @return
     */
    @RequestMapping(value = "/user/userinfo/list", method = RequestMethod.POST)
    R getUserList(@RequestBody Long[] ids);

    /**
     * 获取所有用户
     *
     * @return
     */
    @RequestMapping(value = "/user/userinfo/getUserAll")
    R getUserAll();

    /**
     * 获取所有地址,内部调用
     *
     * @return
     */
    @RequestMapping("/user/address/getAddressAll")
    R getAddressAll();
}
